package me.zhulu.outOfMemory;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: herosea
 * Date: 14-5-7
 * Time: 下午5:01
 * -Xmx10M
 */
public class JavaHeapSpace {

    static class OOMObject {

    }

    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        while(true) {
            list.add(new OOMObject());
        }
    }
}
